package com.sdutcm.Util;

import org.springframework.stereotype.Component;

/*
 *@Author Yan
 *@Create 2019-08-21 14:44
 */
@Component
public class ClassTransform {

    public String Weekday(Integer weekday) {
        String WeekDay = null;
        switch (weekday){
            case 1: WeekDay = "星期一";break;
            case 2: WeekDay = "星期二";break;
            case 3: WeekDay = "星期三";break;
            case 4: WeekDay = "星期四";break;
            case 5: WeekDay = "星期五";break;
            case 6: WeekDay = "星期六";break;
            case 7: WeekDay = "星期日";break;
        }
        return WeekDay;
    }

    public String Session(Integer session) {
        String Session = null;
        switch (session) {
            case 1: Session = "'第3,4节' OR 节次 = '第3节' OR 节次 = '第2,3,4节' OR 节次 = '第1,2,3节' OR 节次 = '第4节' OR 节次 = '第1,2,3,4节'";break;
            case 2: Session = "'第3,4节' OR 节次 = '第3节' OR 节次 = '第2,3,4节' OR 节次 = '第1,2,3节' OR 节次 = '第4节' OR 节次 = '第1,2,3,4节' OR 节次 = '第1节' OR 节次 = '第2节' OR 节次 = '第1,2节'";break;
            case 3: Session = "'第5,6,7节' OR 节次 = '第5,6节' OR 节次 = '第5节' OR 节次 = '第6,7节' OR 节次 = '第7节' OR 节次 = '第6节'";break;
            case 4: Session = "'第8,9节' OR 节次 = '第8节' OR 节次 = '第9节'";break;
        }
        return Session;
    }
}
